﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WMS.IDAL;
using WMS.Entity;

namespace WMS.BLL
{
    public class Goods
    {
        public static readonly IGoods dal = WMS.DAL.Factory.DataAccess.CreateGoodsObject();

        public void Add(GoodsEntity entity)
        {
            dal.Add(entity);
        }

        public void Update(GoodsEntity entity)
        {
            dal.Update(entity);
        }

        public void Delete(int goodsID)
        {
            dal.Delete(goodsID);
        }

        public GoodsEntity GetGoodsEntity(int goodsID)
        {
            return dal.GetEntity(goodsID);
        }

        public IList<GoodsEntity> GetListByName(string name)
        {
            return dal.GetListByName(name);
        }
    }
}
